package utils

type Chanable interface {
	Done([]complex128) ([]complex128, error)
}

type CompositeChan []Chanable

func (c CompositeChan) Done(din []complex128) (dout []complex128, err error) {
	dout = din
	for _, v := range c {
		dout, err = v.Done(dout)
		if err != nil {
			return
		}
	}
	return
}
